import { NavLink, useRoutes } from 'react-router-dom';

import routes from './routes'

function Demo1() {
  const routeElement = useRoutes(routes);
  return (
    <div>
      <div className="row">
        <ul className="nav nav-pills">
          <li className="nav-item">
            <NavLink className="nav-link" to="/about">About</NavLink>
          </li>
          <li className="nav-item">
            <NavLink className="nav-link" to="/home">Home</NavLink>
          </li>
        </ul>
      </div>
      <div className="panel">
        {routeElement}
      </div>
    </div>
  );
}

export default Demo1;
